﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;

namespace SIMSProject.Timer_Job
{
    class OrderNotificationTimerJob : SPJobDefinition
    {
        public OrderNotificationTimerJob()
            : base()
        {
        }

        public OrderNotificationTimerJob(string jobName, SPService service, SPServer server, SPJobLockType targetType)
            : base(jobName, service, server, targetType)
        {
        }

        public OrderNotificationTimerJob(string jobName, SPWebApplication webApplication)
            : base(jobName, webApplication, null, SPJobLockType.ContentDatabase)
        {
            this.Title = "Order Notification Timer Job";
        }

        public override void Execute(Guid contentDbId)
        {
             SPWebApplication webApplication = this.Parent as SPWebApplication;
             SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];
        
             SPList Listjob = contentDb.Sites[0].RootWeb.Lists["Order"];
        }
    }
}
